<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	pageContext.setAttribute("basePath",request.getContextPath());
%>
	<!--左侧导航开始-->
	<nav class="navbar-default navbar-static-side" role="navigation">
	    <div class="nav-close">
	        <i class="fa fa-times-circle"></i>
	    </div>
	    <div class="sidebar-collapse">
	        <ul class="nav" id="side-menu">
	            <li class="logo">
	     			<span class="logo-lg">后台系统</span>
	        	</li>
	        	<li>
		       		<div class="user-panel">
		       			<a class="menuItem" title="个人中心" href="${basePath }/system/user/profile.jsp"> 
		       				<div class="hide">个人中心</div>
			        		<div class="pull-left image">
		                  		<img src="${basePath }${user.head }" class="img-circle" alt=""/>
			        		</div>
		       			 </a>
		       			
		        		<div class="pull-left info">
		          			<p>${user.name }</p>
		          			<a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
		          			<a href="logout.do" style="padding-left:5px;"><i class="fa fa-sign-out text-danger"></i> 注销</a>
		        		</div>
		    		</div>
	        	</li>
	            <li class="active">
	                <a class="menuItem" href="system/main.jsp"><i class="fa fa-home"></i> <span class="nav-label">主页</span> </a>
	            </li>
	
				<c:if test="${user.roleId == 4 }"> <!-- 工作人员 -->
					<li>
		            	<a href="#">
		            		<i class="fa fa-legal"></i>
		                	<span class="nav-label">生产管理</span> 
		                	<span class="fa arrow"></span>
		            	</a>
		                <ul class="nav nav-second-level collapse">
							<li>
								<a class="menuItem" href="production/control.jsp">生产监控</a>
							</li>
							<li>
								<a class="menuItem" href="production/norm/getProductionStandard.do">生产标准</a>
							</li>
							<li>
								<a class="menuItem" href="production/record/getProductionRecord.do">生产记录</a>
							</li>
						</ul>
					</li>
				</c:if>
	
				<c:if test="${user.roleId == 3 }"> <!-- 仓库管理员 -->
					<li>
		            	<a href="#">
		            		<i class="fa fa-info-circle"></i>
		                	<span class="nav-label">基本信息</span> 
		                	<span class="fa arrow"></span>
		            	</a>
		                <ul class="nav nav-second-level collapse">
							<li>
								<a class="menuItem" href="toTeaCategory.do">茶种信息</a>
							</li>
							<li>
								<a class="menuItem" href="toDeviceModel.do">设备型号</a>
							</li>
							<li>
								<a class="menuItem" href="toSupplier.do">供应商</a>
							</li>
						</ul>
			        </li>
		        </c:if>
	
				<c:if test="${user.roleId == 3 }"> <!-- 仓库管理员 -->
					<li>
		            	<a href="#">
		            		<i class="fa fa-gear"></i>
		                	<span class="nav-label">仓库管理</span> 
		                	<span class="fa arrow"></span>
		            	</a>
		                <ul class="nav nav-second-level collapse">
							<li>
								<a class="menuItem" href="toTea.do">茶叶出入库</a>
							</li>
							<li>
								<a class="menuItem" href="toDevice.do">设备出入库</a>
							</li>
							<li>
								<a class="menuItem" href="toDeviceRepair.do">设备维修</a>
							</li>
							<!-- <li>
								<a class="menuItem" href="repertory2/repertory.jsp">库存查看</a>
							</li> -->
							<!-- <li class="">
								<a href="#">库存信息<span class="fa arrow"></span></a>
								<ul class="nav nav-third-level collapse" aria-expanded="false" style="height: 0px;">
									<li><a class="menuItem" href="repertory/device.html">设备信息</a></li>
									<li><a class="menuItem" href="repertory/tea.html">茶叶信息</a></li>
									<li><a class="menuItem" href="repertory/product.html">成品信息</a></li>
								</ul>
							</li>
							<li>
								<a class="menuItem" href="repertory/repair.html">设备维修</a>
							</li> -->
						</ul>
		            </li>
	            </c:if>
	
				<c:if test="${user.roleId == 2 }"> <!-- 普通管理员 -->
		            <li>
		            	<a href="#">
		            		<i class="fa fa-users"></i>
		                	<span class="nav-label">用户管理</span> 
		                	<span class="fa arrow"></span>
		            	</a>
		                <ul class="nav nav-second-level collapse">
							<li>
								<a class="menuItem" href="system/user/list.do">用户管理</a>
							</li>
							<li>
								<a class="menuItem" href="system/role/list.do">角色管理</a>
							</li>
							<li>
								<a class="menuItem" href="system/thaw/list.do">解冻申请</a>
							</li>
						</ul>
		            </li>
	            </c:if>
	            
	            
				<c:if test="${user.roleId == 1 }">  <!-- 超级管理员 -->
					<li>
		            	<a href="#">
		            		<i class="fa fa-gear"></i>
		                	<span class="nav-label">安全维护</span> 
		                	<span class="fa arrow"></span>
		            	</a>
		                <ul class="nav nav-second-level collapse">
							<li class="">
								<a href="#">日志管理<span class="fa arrow"></span></a>
								<ul class="nav nav-third-level collapse" aria-expanded="false" style="height: 0px;">
									<li><a class="menuItem" href="${basePath }/security/runningLogs/list.do">运行日志</a></li>
									<li><a class="menuItem" href="${basePath }/security/error.html">异常日志</a></li>
								</ul>
							</li>
							<li>
								<a class="menuItem" href="${basePath }/security/backup/list.do">备份还原</a>
							</li>
						</ul>
		            </li>
	            </c:if>
	        </ul>
	    </div>
	</nav>
	<!--左侧导航结束-->